package com.cqhfan.redis.constants;

/**
 * @author 眭传洪
 * @create 2025-07-26 0:12
 */
public interface RedisConstants {

    Long CODE_INTERVAL_TTL = 1L;

    String CODE_INTERVAL_KEY_PREFIX = "code:interval:";

    String PHONE_CODE_KEY_PREFIX = "code:phone:";

    Long PHONE_CODE_TTL = 5L;

    String REFRESH_TOKEN_PREFIX = "refresh_token_";

    String LOGIN_CACHE_KEY_PREFIX = "login:uuid:";

    String NULL_VALUE = "";

    String CACHE_KEY_PREFIX = "cache:";

    String CACHE_REBOOT_LOCK_KEY_PREFIX = "lock:reboot:";

    Long NULL_VALUE_TTL = 5L;

    Long CACHE_LOCK_TTL = 10L;

    String DOUYIN_NUMBER_UPDATE_KEY_PREFIX = "douyinNumber:id";

    Long DOUYIN_NUMBER_UPDATE_INTERVAL = 180L;

    String DOUYIN_NUMBER_INCR_KEY = "incr_douyinNumber";

    interface UserProfileInfo {

        String KEY = "user:profile:uid:";

        String FOLLOW_HASH_KEY ="follow";

        String FRIEND_HASH_KEY = "friends";

        String LIKED_HASH_KEY = "liked";

        String FANS_HASH_KEY = "fans";

    }

    interface FOLLOW {
        String KEY = "follow:uid:";
    }

    interface LIKED {
        String LIKED_RECORD_KEY_PREFIX = "liked:record:bizId:";

        String USER_LIKED_RECORD_KEY_PREFIX = "liked:user:record:uid:";

        String LIKES_QUANTITY_KEY_PREFIX = "likes:quantity:type:";
    }

    interface IM {

        String GROUP_MEMBERS_KEY_PREFIX = "chat:group:groupId:";

        String UPDATE_CURRENT_CHAT_LIST_KEY = "current_chat_list";

        String GROUP_MESSAGE_UNREAD_QUANTITY_KEY_PREFIX = "group_message_unread:gid:";

        String SYSTEM_MESSAGE_IDEMPOTENT_KEY_PREFIX = "system:message:uuid:";

        Long SYSTEM_MESSAGE_IDEMPOTENT_TTL = 1L;

    }

}
